package com.sea.base.json.coll

import java.io.Serializable

/**
 * java版链式add
 */
interface IJsonList : Serializable {

    companion object {
        @JvmStatic
        fun newInstance(): IJsonList {
            return JsonListImpl()
        }
    }

    /**
     * @param obj 支持[IJsonMap]、[IJsonList]、Map、List以及基础类型
     */
    fun add(obj: Any?): IJsonList
    operator fun contains(obj: Any?): Boolean
    operator fun get(index: Int): Any?
    fun toList(): List<Any?>
    val size: Int
    fun toJson(): String
}